<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html:html>
    <head>
        <link href="<c:url value='/resources/css/layout.css'/>" rel="stylesheet" type="text/css"/>
        <title><fmt:message key="label.usuarios"/></title>
    </head>
    <body>
        <div class="titleDiv"><fmt:message key="application.title"/></div>
        <br/><br/>
        <h1><fmt:message key="label.lista.usuarios"/></h1>
        <table class="tabelaUsuario">
            <tr>
                <th><fmt:message key="label.usuario.nome"/></th>
                <th><fmt:message key="label.eventos"/> </th>
                <th>&nbsp;</th>
            </tr>
            <c:forEach var="usuario" items="${usuarios}" varStatus="status">
                <tr class="${status.index%2==0?'even':'odd'}">
                    <td class="nowrap"><c:out value="${usuario.nome}"/></td>
                    <td class="nowrap">
                        <c:url var="url" scope="page" value="/listaEventos.do">
                            <c:param name="idUsuario" value="${usuario.idUsuario}"/>
                            <c:param name="dispatch" value="getEventos"/>
                        </c:url>
                        <a href="${url}">Visualizar</a>                    
                    </td>
                </tr>
            </c:forEach>
        </table>
    </body>
</html:html>